package com.example.shiwu.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.fragment.app.Fragment;

import com.example.shiwu.ItemInfoActivity;
import com.example.shiwu.MyActivity;
import com.example.shiwu.MyEditPassActivity;
import com.example.shiwu.MyJoinActivity;
import com.example.shiwu.R;

public class MyFragment extends Fragment implements View.OnClickListener {
    private String content;
//    public MyFragment(String content) {
//        this.content = content;
//    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.activity_my,container,false);
        TextView tx = view.findViewById(R.id.my_out_btn);
        tx.setOnClickListener(this);
//        ImageView tx2 = view.findViewById(R.id.my_join_type);
//        tx2.setOnClickListener(this);
        ImageView tx3 = view.findViewById(R.id.edit_pass);
        tx3.setOnClickListener(this);
        return view;
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.my_out_btn:
                System.exit(0);//退出登录
                break;
//            case R.id.my_join_type:
//                Intent intent = new Intent(this.getActivity(), MyJoinActivity.class);
//                startActivity(intent);
//                break;
            case R.id.edit_pass:

                Intent intent1 = new Intent(this.getActivity(), MyEditPassActivity.class);
                startActivity(intent1);
            default:
        }
    }
}
